#ifndef ZONE_MANAGER_H_
#define ZONE_MANAGER_H_

#include "../../Generic/DList.h"
#include "../../Render/Camera.h"
#include "../../Generic/RanGen.h"
#include "Zone.h"

class Zone;

class ZoneManager				// used to manage all of the map pieces.
{
private:
	DList<Zone*>	m_WorldZones;
	int				m_WorldWidth;
	int				m_WorldHeight;
	int				m_ZoneWidth;
	int				m_ZoneHeight;
	int				m_ZoneImageID;
	float			m_ZoneChance[ZONE_MAX];

	RanGen m_Random;

	// Almost useless int to limit the amount of water.
	int m_WaterLimit;

	// Only instance of the zone manager
	static ZoneManager m_Instance;

	ZoneManager(void);
	ZoneManager(const ZoneManager&);
	ZoneManager& operator=(const ZoneManager&);
	~ZoneManager(void);

	void RandomizeZone(Zone* zone);
public:
	// need to put in multiple functions:
	// one to modify the nessecary piece. 
	// one/many to call info for the game. 
		// both of these I think we can do with one function that takes in 
		// multiple variable to determine what is modified/shown and use the 
		// if(variable) method. any thoughts? 
		// will go ahead and do it so at least I have something to test.

	static ZoneManager* GetInstance(void);

	void			Initialize(void);
	void			Render(Camera2D& renderTarget);
	void			Shutdown(void);

	// These functions will eventually be moved into the private section and called in initialize
	void			CreateWorld(void);

	// Mutators
	void			SetWorldSize(int width, int height);
	void			SetZoneType(int position, int type);
	void			SetWaterLimit();
	void			AddToWaterLimit();

	// Accessors
	unsigned int	GetWorldSize(void);
	unsigned int	GetWorldWidth(void);
	unsigned int	GetWorldHeight(void);
	unsigned int	GetWorldPWidth(void);
	unsigned int	GetWorldPHeight(void);
	unsigned int	GetWaterLimit(void);
	Zone*			GetZone(int index);
};

#endif